package main

import (
	"flag"
	"rpcx/rpcx"
)

//https://legacy.gitbook.com/book/smallnest/go-rpc-programming-guide/details
//http://colobu.com/2016/09/18/go-net-rpc-guide/
//官方net/rpc库被遗弃, 这里只做简单的学习实现
func main() {

	agentType := flag.String("agent", "client", "运行模式: server, client")
	flag.Parse()

	switch *agentType {
	case "server":
		rpcx.Server()
	case "client":
		rpcx.Client()
	default:
		flag.Usage()
	}

}
